import { http } from "@/utils/http";

export function useSearchAPI() {
  const searchByKeyword = async (
    SearchKeyWord: string,
    type: string,
    uid: string,
    page: number = 1,
    rows: number = 20
  ) => {
    return await http.get(
      `/music/queryAllByKeyWord?SearchKeyWord=${SearchKeyWord}&type=${type}&uid=${uid}&page=${page}&rows=${rows}`
    );
  };

  return {
    searchByKeyword,
  };
}
